<template>
    <div class="teacherList">
        <div class="weui-cell user">
             <div class="weui-cell__hd">
                  <avatar :avatar="teacher.avatar" :Level="teacher.partner_level" :userId="teacher.id" :isAuth="teacher.is_auth" :isPartner="teacher.is_partner"></avatar>
             </div>
             <div class="weui-cell__bd">   
                 <div>
                    <div class="nickname">
                        <div class="weui-cell__bd">{{teacher.nickname}}</div>
                        <div><report :info="teacher" type="1" model="3"></report></div>
                    </div>
                    <div class="schoolage">
                        <van-tag plain color="#E9B55E" size="large">优秀老师</van-tag>  教龄{{teacher.cert.teaching_age}}年 <span>|</span> 粉丝{{teacher.fans}}<span v-show="type==2" style="color:#E9B55E">| 良师益友</span>
                    </div>
                 </div>
                 <div class="property weui-cell">
                     <div class="weui-cell__bd"><span  class="tags" v-for="item in teacher.cert.label" :key="item">{{item}}</span> </div>
                     <div class="juli" v-if="(teacher.dis)">距离{{teacher.dis}}km</div>
                </div>
             </div>
             
        </div>
    </div>
</template>

<script>
import report from "@/components/report";
import avatar from "@/components/avatar"
export default {
   props: ["teacher","type"],
   components: {
       report,
       avatar
  },
}
</script>
<style lang="scss">
.teacherList{
    .Avatar {
        width: 55px;
        height: 55px;
        .avatar{
           width: 55px;
           height: 55px;
        }
    }
}
</style>
<style scoped lang="scss">
   .teacherList{
        width:345px;
        padding-bottom: 15px;
        background:rgba(255,255,255,1);
        border:1px solid rgba(221,221,221,1);
        border-radius:3px;
        margin: 0 auto;
        margin-top: 15px;
        .user{
            -webkit-box-align:center;
            -webkit-align-items:flex-start;
            align-items:flex-start;
            .avatar{
                width:55px;
                height:55px;
                border-radius:50%;
            }
            .nickname{
                font-size:14px;
                font-weight:bold;
                color:rgba(26,132,251,1);
                line-height:18px;
                display:flex;
            }
            .schoolage{
                margin-top: 9px;
                font-size: 12px;
                color: #666;
                span{
                    padding: 0 5px;
                }
            }
        }
        .report{
            width:25px;
            height:15px;
            display:block;
        }
        .property{
            display:flex;
            padding:20px 0;
            padding-bottom: 0;
            .tags{
                margin-top:0;
                margin-right: 5rpx;
            }
        }
        .juli{
            font-size:14px;
            font-weight:bold;
            color:rgba(233,181,94,1);
            line-height:18px;
        }
        
   }
   .teacherList1{
       border:0;
       border-bottom:10rpx solid #F4F5F5;
   }
</style>
